<div class="bg-light lter b-b wrapper-md">
    <h4 class="m-n font-thin">会员卡权益使用流水</h4>
</div>
<div class="wrapper-md ng-scope" ng-controller="memberCardUseCtrl">
    <div class="panel panel-default">
        <div class="row wrapper">
            <div class="col-sm-12">
                <form class="form-inline ng-pristine ng-valid">
                    <div class="form-group">
                        <label class="control-label">店铺订单编号</label>
                        <input type="text" class="input-sm form-control" ng-model="memberCardUseVO.shopOrderNumber" maxlength="36" placeholder="流水号">
                    </div>
                    <div class="form-group">
                        <label class="control-label">用户名称</label>
                        <input type="text" class="input-sm form-control" ng-model="memberCardUseVO.userName" maxlength="20" placeholder="用户名称">
                    </div>
                    <div class="form-group">
                        <label class="control-label">会员卡权益类型</label>
                        <select class="input-sm form-control" ng-model="memberCardUseVO.privilegeType">
                            <option value="">－－请选择－－</option>
                            <option value="0">包邮</option>
                            <option value="1">折扣</option>
                        </select>
                    </div>

                    <div class="form-group">
                        <label class="control-label">会员卡名称</label>
                        <input type="text" class="input-sm form-control" ng-model="memberCardUseVO.cardName" maxlength="20" placeholder="会员卡名称">
                    </div>
                    
                    <button class="btn btn-sm btn-default" ng-click="query()">查询</button>
                </form>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="table-responsive">
            <table class="table table-striped b-t b-light">
                <thead>
                    <tr>
                        <th>店铺订单编号</th>
                        <th>用户名称</th>
                        <th>会员卡名称</th>
                        <th>权益类型</th>
                        <th>抵扣金额</th>
                        <th>订单状态</th>
                        <th>使用时间</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="item in list">
                        <td>{{item.shopOrderNumber}}</td>
                        <td>{{item.userName}}</td>
                        <td>{{item.cardName}}</td>
                        <td>
                            <span ng-if="item.privilegeType == 0">包邮</span>
                            <span ng-if="item.privilegeType == 1">折扣</span>
                        </td>
                        
                        <td>
                           {{item.privilegeMoney}}元
                        </td>
                        <td>
                            <span class="label bg-warning" ng-if="item.status == 0">未付款</span>
                            <span class="label bg-info" ng-if="item.status == 1">已付款</span>
                            <span class="label bg-info" ng-if="item.status == 2">已发货</span>
                            <span class="label bg-primary" ng-if="item.status == 3">确认收货/待评价</span>
                            <span class="label bg-primary" ng-if="item.status == 4">未使用</span>
                            <span class="label bg-success" ng-if="item.status == 5">已使用</span>
                            <span class="label bg-success" ng-if="item.status == 6">交易完成</span>
                            <span class="label bg-light dk" ng-if="item.status == 7">交易取消</span>
                            <span class="label bg-danger" ng-if="item.status == 8">退货/退款中</span>
                            <span class="label bg-success" ng-if="item.status == 9">退款/退货完成</span>
                        </td>
                        <td>{{item.createdTime}}</td>
                    </tr>
                </tbody>
            </table>
            <div ng-if="list.length<=0 && !app.loading" class="padder-v text-center">
                <span class="h6">~未搜索到任何数据~</span>
            </div>
            <div>
                <circle-loading ng-if="app.loading"></circle-loading>
            </div>
        </div>
        <footer class="panel-footer">
            <div class="row">
                <div class="col-sm-offset-4 col-sm-4 text-center">
                    <small class="text-muted inline m-t-sm m-b-sm">显示第 {{startRow}} 至 {{endRow}} 项结果，共 {{totalItems}} 项</small>
                </div>
                <div class="col-sm-4 text-right text-center-xs">
                    <pagination boundary-links="true" total-items="totalItems" ng-model="currentPage" ng-change="pageChanged()" max-size="{{maxPageRow}}"
                        class="pagination-sm m-t-none m-b" previous-text="上一页" next-text="下一页" first-text="首页" last-text="尾页"></pagination>
                </div>
            </div>
        </footer>
    </div>
</div>